#include<iostream>
using namespace std;
int main()
{
	int n;
	cin >> n;
	while (n--)
	{
		int a = 1;
		int b = 1;
		int sum = 0;
		int k;
		cin >> k;
		if (k<3)
		{
			cout << k-1 << endl;
		}
		else {
			for (int i = 3; i <= k; i++) {
				sum = a + b;
				a = b;
				b = sum;
			}
			cout << sum << endl;
		}
	}
	return 0;
}

